﻿@model Inscriptionem.Models.Blog.Views.BlogViewModel
@{
    Layout = null;
}
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>@(Inscriptionem.Configuration.Configuration.Instance.General.Title + " » " + Model.SectionLocalizedName)</title>
	<link>@Request.Url</link>
	<description>@Inscriptionem.Configuration.Configuration.Instance.General.Title</description>
	<lastBuildDate>@(Model.Articles.Any() ? Model.Articles.OrderByDescending(m => m.CreatedDate).First().CreatedDate.ToString("ddd, dd MMM yyyy") : DateTime.Now.ToString("ddd, dd MMM yyyy")) 00:00:00 +0000</lastBuildDate>
	<language>@Model.Language.ToLower().Substring(0, 2)</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>

    @foreach (var artile in Model.Articles)
    {
    <text>
    <item>
	<title>@artile.Title</title>
	<link>@Inscriptionem.Configuration.Configuration.Instance.General.URL/@Model.Language/@Model.Section/@(artile.Type.ToString())/@artile.ID</link>
	<pubDate>@artile.CreatedDate.ToString("ddd, dd MMM yyyy") 00:00:00 +0000</pubDate>
	<dc:creator></dc:creator>
	<description><![CDATA[@artile.Content]]></description>
    </item>
    </text>
    }
	
	</channel>
</rss>